﻿using System;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Configuration;
using Quantum.SignalR;

namespace TestSignalRServer
{
    public class MySignalRServerStartup : ServerStartup
    {
        protected override void ConfigureRoutes(HubRouteBuilder routes)
        {
            base.ConfigureRoutes(routes);
            //routes.MapHub<VersionBroadcaster>("version");
            //routes.MapHub<DiscountBroadcaster>("discount");
            //routes.MapHub<OrderBroadcaster>("orders");
            routes.MapHub<DatetimeReplier>("time");
            routes.MapHub<AuthorizedReplier>("authorized");
        }

        public MySignalRServerStartup(IConfiguration configuration)
        {
            var section = configuration.GetSection("Logging");
            Console.WriteLine($"{section.Key}={section.Value}");
        }
    }
}
